import java.io.EOFException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class DatabaseConnect {
	Connection con;

	public DatabaseConnect(Connection con) {
		this.con = con;
	}

	public ResultSet sendQuery(String query) throws SQLException, EOFException {
		Statement stmt = con.createStatement();
		return stmt.executeQuery(query);
	}

	public void sendUpdateQuery(String query) throws SQLException {
		Statement stmt = con.createStatement();
		stmt.executeUpdate(query);
	}

}
